.wrap {
  position: relative;
  width: 400px;
  height: 400px;
  background-color: #acf;
  margin: 200px auto;
}
.wrap .inner:nth-child(1) {
  width: 200px;
  height: 200px;
  background-color: #ccc;
}
.wrap .inner:nth-child(2) {
  width: 100px;
  height: 100px;
  background-color: #aaa;
}
.center,
.wrap .inner {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  margin: auto;
}
.center:hover,
.wrap .inner:hover {
  background-color: red;
}
